ArcGIS Runtime SDK for WPF - Library Reference
GetServiceAsync(Action<LocalGeometryService>) Method
See Also 
ESRI.ArcGIS.Client.Local Namespace > LocalGeometryService Class > GetServiceAsync Method : GetServiceAsync(Action<LocalGeometryService>) Method

callback
An action delegate either in the form of a lambda expression or a named method.
Creates and starts a new LocalGeometryService or reuses an existing LocalGeometryService if one is already running on the LocalServer.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Sub GetServiceAsync( _
   ByVal callback As Action(Of LocalGeometryService) _
) 
C# 
public static void GetServiceAsync( 
   Action<LocalGeometryService> callback
)

Remarks

This method, particularly when used in conjunction with a Lambda Expression, provides a convenient way to quickly obtain a reference to a LocalGeometryService without having to specifically check for existing LocalGeometryService instances already running on the LocalServer or directly instantiate a new LocalGeometryService and explicitly call the StartAsync method.

The Action delegate will always be called regardless of the success or failure of the LocalServer to create or return a LocalGeometryService. For this reason the Error property should always be checked to confirm a successful execution. The Error property will be will be null if the if the LocalGeometryService was started successfully.

Parameters

callback
An action delegate either in the form of a lambda expression or a named method.

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8

See Also

© ESRI, Inc. All Rights Reserved.